#pragma once

#include "definitions.h"

//Additionaly we need a list of all edges
//which help us to find a proper edge 
//typedef std::list<figureEdge> edgeList;

using namespace std;

template <class T> class SearchTree : 
public list<T> 
{
protected:
  //edgeList  * m_edgeList;
public:
  SearchTree(void);
  ~SearchTree(void);
  void Init(const list<T> &);
  void InsertEdge(const T &);
  void RemoveEdge(const T &);
  void FindEdge(const T &); //find left of given Vertice
};

template <class T>
SearchTree<T>::SearchTree(void)
{
}

template <class T>
SearchTree<T>::~SearchTree(void)
{
}

template <class T> 
void Init(const list<T> & _list)
{
  //list<T>::iterator it;
  //Copy the input list into this
}

template <class T>  
void SearchTree<T>::InsertEdge(const T & t)
{
  list<T>::push_back(t);
}

template <class T>
void SearchTree<T>::RemoveEdge(const T & t)
{
  typename list<T>::iterator it;
  for(it = list<T>::begin();
      it != list<T>::end();
      it++)
  {
    if((*it) == t)
    {
      list<T>::erase(it);
      break;
    }
  }
}

template <class T>
void SearchTree<T>::FindEdge(const T & t)
{

}